<%@ page language="java" contentType="text/html; charset=utf-8"%>
<body>
	<%@ include file="head.jsp" %>
	<div style="position:absolute;left:30%" class="col-lg-4">
		<div class="input-group">
			<input id="name" type="text" class="form-control" placeholder="输入漫画名">
			<span class="input-group-btn">
				<button id="search" class="btn btn-default" type="button">
					搜索
				</button>
			</span>
		</div>
		<br/>
		<br/>
		<div id="result">
		</div>
	</div>
	<div id = "result"></div>
	<script src="https://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>
	<script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
	<script>
		$(function () {
			$("#search").click(function () {
				var name = document.getElementById("name").value;
				console.log(name);
				$.get("searchDMZJ?keyword=" + name + "&page=0", function (res) {
					console.log(res);
					var html = "";
					for (var i = 0; i < res.length; i++) {
						html += "<br/><br/><img src='data:image/jpg;base64," + res[i].cover + "' height='200' width='150'>";
					}
					$("#result").html(html);
				});
			});
		});
	</script>
</body>
